<template>
    <div>
        <ul>
            <li v-for="(item) in arrlist" :key="item.id">
                <img :src="item.img">
                <p>{{ item.name }}</p>
                <span>￥{{item.price }}</span>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
                <button @click="jian(item.id)">-</button>
                <span>{{ item.num }}</span>
                <button @click="jia(item.id)">+</button>
            </li>
        </ul>
    </div>
</template>
<script>
export default {
    data() {
        return {
            arrlist:[]
        }
    },
    created() {
      this.arrlist = JSON.parse(localStorage.getItem("arr"))  
    },
    computed: {
    },
    methods: {
    },
}
</script>
<style lang="less" scoped></style>
